#include "Debug.h"
#include "Utilities.h"
#define EPSILON 0.001

MItMeshVertex* Utilities::vertsIt;
MItMeshPolygon* Utilities::faceIt;

Utilities::Utilities()
{
}

Utilities::~Utilities(void)
{
}


void Utilities::setIteratorPointers(MItMeshVertex* _vertsIt, MItMeshPolygon* _faceIt)
{
	vertsIt = _vertsIt;
	faceIt = _faceIt;
}

//pseudo overloader for brevity
MItMeshVertex* Utilities::vertsItGet(int index)
{
	int prevVertex;
	vertsIt->setIndex(index, prevVertex);
	return vertsIt;
}

//pseudo overloader for brevity 
MItMeshPolygon* Utilities::faceItGet(int index)
{
	int prevface;
	faceIt->setIndex(index, prevface);
	return faceIt;
}

bool Utilities::doubleEqual(double a, double b)
{
	if((a < b + EPSILON) && (a > b- EPSILON))
		return true;
	return false;
}


